package edu.tgc.web.form.system.validation;

import java.lang.annotation.Documented;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;

import javax.validation.Constraint;
import javax.validation.Payload;
import javax.validation.constraints.Size;

import org.hibernate.validator.constraints.NotBlank;

@Retention(RetentionPolicy.RUNTIME)
@Target(value = { ElementType.FIELD, ElementType.METHOD })
@Documented
@Constraint(validatedBy = {})
@NotBlank(message = "名称不能为空")
@Size(max = 31, message = "名称长度不能超过{max}个字符")
public @interface ValidateName {

    Class<?>[] groups() default {};

    String message() default "";

    Class<? extends Payload>[] payload() default {};
}
